import district from './district.json'
import _boundaryjson from './boundary.json'
import _polygonJson from './polygon.json'

// 区/县名
export const districtName = '西华县'

// 区/县边界
export const boundaryjson = _boundaryjson

// 乡镇边界
export const polygonJson = _polygonJson

// 区/县中心
// export const center = [114.529709, 33.768277] // 真正的中心点
export const center = [114.383877, 33.742628] // 左移一点

// 乡镇数据
export const townList = getTownList()

// 获取镇里列表数据
function getTownList() {
  const townList = district.districts[0].districts

  const arr = {}
  townList.map(item => {
    arr[item.name] = {
      name: item.name,
      center: item.center.split(','),
    }
  })

  return arr
}
